# -*- coding: utf-8 -*-
from PIL import Image
import os
import os.path as osp
import pickle


def load(filename):
    with open(filename, 'rb') as fo:
        data = pickle.load(fo, encoding='latin1')
    return data


BASEDIR = osp.dirname(osp.abspath(__file__))
path_file = osp.join(BASEDIR, '..', r'batches.meta')
data = load(path_file)

print(data)
# {
# 'num_cases_per_batch': 10000,
# 'label_names': ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck'],
# 'num_vis': 3072
# }
